             package com.java.diagnostics.visualizer.recommender;
             
             import com.java.diagnostics.visualizer.data.AggregateData;
             import com.java.diagnostics.visualizer.data.DataPoint;
             import com.java.diagnostics.visualizer.data.TupleData;
             import com.java.diagnostics.visualizer.gc.recommender.RecommendationPreferenceHelper;
             import com.java.diagnostics.visualizer.parser.vgc.constants.VGCGCReasons;
             import com.java.diagnostics.visualizer.recommender.util.RecommendationLabels;
             import java.text.MessageFormat;
             
             public class LookForExcessiveSystemGCs
               extends RecommendationBase
               implements Recommendation
             {
               public void recommend(AggregateData data)
               {
                 TupleData reasons = data.getTupleData("VGCLabels.gc.reasons");
                 
                 if ((reasons != null) && (!reasons.isEmpty()))
                 {
                   if (reasons.getRawMaxY() >= VGCGCReasons.SYS_INT) {
                     DataPoint[] reasonPoints = reasons.getDataPoints();
                     double sysCount = 0.0D;
                     
                     for (int i = 0; i < reasonPoints.length; i++) {
                       if (reasonPoints[i].getRawY() == VGCGCReasons.SYS_INT) {
                         sysCount += 1.0D;
                       }
                     }
                     
                     double percent = 100.0D * sysCount / 
                       reasonPoints.length;
                     if (percent > this.helper.getSystemGCErrorThreshold()) {
                       addWarning(data, MessageFormat.format(
                         RecommendationLabels.SYSTEM_GCS_MESSAGE, 
                         new Object[] { Integer.valueOf((int)sysCount), Integer.valueOf(reasonPoints.length), Double.valueOf(percent) }));
                     }
                   }
                 }
               }
             }


